/**
 * utils fn
 * @author jinglf000
 * ###### Tue Apr 3 13:58:41 CST 2018
 */

/* eslint-disable */

/**
 * timer Frame Funtion
 * @param {Function} fn 定时执行的函数
 */
export const timer = fn => {
  if (window.requestAnimationFrame) {
    window.requestAnimationFrame(fn);
  } else {
    setTimeout(fn, 16);
  }
};
